$(function () {
	var ymDelicateMenuId = ym.getQueryStringByName('delicateMenuId');
    ym.ajax({
        url:"/DeclicateAskAnswer/selectArticleByMenuId",
        param:{
            "ymDelicateMenuId":ymDelicateMenuId
        },
        success:function (data) {
            html='<section data-am-widget="accordion" class="am-accordion am-accordion-gapped" data-am-accordion=\'{  }\'></section>';
            $('.content').html(html);
            console.log(data);
            for(var i=0;i<data.obj.length;i++){
               html_dl='<dl class="am-accordion-item ">\n' +
	                   '<dt class="am-accordion-title">\n' +
	                   data.obj[i].delicateTitle +
	                   ' </dt>\n' +
	                   ' <dd class="am-accordion-bd am-collapse">\n' +
	                   ' <!-- 规避 Collapase 处理有 padding 的折叠内容计算计算有误问题， 加一个容器 -->\n' +
	                   ' <div class="am-accordion-content">\n' +
	                    data.obj[i].delicateArticleContent +
	                   ' </div>\n' +
	                   '</dd>\n' +
	                   '</dl>'
	                $('.am-accordion').append(html_dl);

            }
        }
    })
    
   $('body').on('click','dt',function(){
   		$(this).next().slideToggle(500);
   })
})